package com.wxl.xueyuan;

import android.app.Application;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;


public class MyApp extends Application {
    private static Map<String, Object> mData;

    public static Object getmData(String key) {
        return mData.get(key);
    }

    public static void setmData(String key, Object value) {
        mData.put(key, value);
    }

    @Override
    public void onCreate() {
        super.onCreate();

        mData = new HashMap<String, Object>();
        mData.put("ID", "2019141460005");
        mData.put("cg0", 1);
        mData.put("cg1", 1);
        mData.put("cg2", 1);
        mData.put("cg3", 1);
        mData.put("cg4", 1);
        mData.put("cg5", 1);
        //synchronized the map
//        mData = Collections.synchronizedMap(mData);

        // then restore your map

    }

    public void onTerminate() {
        super.onTerminate();

        //save data of the map
    }
}
